<?php
namespace common\services;

use common\base\BaseActiveRecord;
use common\helpers\TStringHelper;
use common\models\ExhibitionMeeting;
use yii\data\ActiveDataProvider;
use yii\data\Pagination;

class ExhibitionMeetingServices extends ExhibitionMeeting
{

    /**
     * 获取展会同期会议
     * @param $exhibition_id
     * @return ExhibitionMeeting|mixed|null|static
     */
    public function getExhibitionMeeting($exhibition_id) {
        $model = ExhibitionMeeting::findOne(['exhibition_id' => $exhibition_id, 'status' => ExhibitionMeeting::STATUS_FLAG_NORMAL]);
        return !empty($model) ? $model : new ExhibitionMeeting();
    }

}
